      subroutine DTime
        use global
        Implicit none
	    integer :: i,ie,nelt
	    Real(8) :: Le_min,L_e,V_max
	    nelt=nnt-1
	    Le_min=1.D10
	    V_max=-1.D10
	    
	    !!! Find the minmum length of elements.
	    do  ie=1,nelt
	      L_e=Abs(vcor(ie)-vcor(ie+1))
	      Le_min=min(Le_min,L_e)
	    enddo
	    !!! Find the maxmum veloctiy.
	    do i=1,nnt
	      V_max=max(V_max,Abs(U(i,2)/U(i,1)+V_sound(i)))
		  
	    enddo
	    !write(*,*) V_max
	    !!! Find the time increment
	    Delta_t=CFL*Le_min/V_max
	    !write(*,*)Delta_t
      end subroutine